﻿using System;
using System.Reflection;

namespace MugenInjection.Interface
{
    /// <summary>
    /// Represents the interface that selects constructor for the specified service.
    /// </summary>
    public interface IConstructorResolver
    {
        /// <summary>
        /// Selects constructor for the specified service type.
        /// </summary>
        /// <param name="service">The specified service <see cref="Type"/>.</param>
        /// <param name="bindingContext">The specified <see cref="IBindingContext"/>s.</param>
        /// <returns>An instance of the <see cref="ConstructorInfo"/>.</returns>
        ConstructorInfo Resolve(Type service, IBindingContext bindingContext);

        /// <summary>
        /// Sets the <see cref="ConstructorInfo"/> to the current <see cref="IConstructorResolver"/>.
        /// </summary>
        /// <param name="constructorInfo">The specified <see cref="ConstructorInfo"/></param>
        void SetConstructor(ConstructorInfo constructorInfo);
    }
}